#ifndef _TWITTERFORM_H_
#define _TWITTERFORM_H_

#include <FBase.h>
#include <FUi.h>
#include <FSocial.h>
#include <FMedia.h>
#include <FGraphics.h>
#include "../Ui/TwitterMyProfileForm.h"
#include "../Ui/TwitterMyFollowingForm.h"
#include "../Model/TwitterMySnsGatewayManager.h"

class TwitterForm: public Osp::Ui::Controls::Form,
		public Osp::Ui::IActionEventListener {

	// Construction
public:
	TwitterForm(void);
	virtual ~TwitterForm(void);
	bool Initialize();
	result OnInitializing(void);
	result OnTerminating(void);
	virtual void
	OnActionPerformed(const Osp::Ui::Control& source, int actionId);
private:
	//	MyProfileForm*pMyProfileForm;
	//MyFollowingForm*pMyFollowingForm;

	static const int ID_OPTIONMENU_SIGNOUT = 101;
	static const int ID_OPTIONMENU_MYPROFILE = 102;
	static const int ID_OPTIONMENU_FOLLOWING = 103;
	static const int ID_OPTIONMENU = 106;

	static const int ID_BUTTON_NEXT = 201;
	static const int ID_BUTTON_HOME = 202;

	static const int ID_ELEMENT_NAME = 401;
	static const int ID_ELEMENT_ACTIVITY = 402;

	static const int ID_BUTTON_ADDMYSTATUS = 107;
	static const int ID_SOFTKEY_BACK = 109;

	static const int MAX_STATUS_LEN = 140;
	//	Osp::Ui::Controls::Frame*pFrame;
	//	Osp::Ui::Controls::Form *pFormParent;

	Osp::Ui::Controls::OptionMenu*pOptionMenu;
	Osp::Ui::Controls::EditField*pEditFieldStatusText;
	Osp::Ui::Controls::Button*pButtonNext;
	Osp::Ui::Controls::Button*pButtonHome;
	Osp::Ui::Controls::Button *pButton_addmystatus;
	Osp::Ui::Controls::CustomList*pCustomList;
	Osp::Ui::Controls::CustomListItemFormat*pListItemFormat;

	MySnsGatewayManager*pSnsGatewayTwitterForm;
	Osp::Base::String myUserName;
	static int FormId;
	bool IsOpenedOptionMenu;

public:
	//void SetParentForm(Osp::Ui::Controls::Form*pParent);
	//void SetFrame(Osp::Ui::Controls::Frame*pFrame);
	void SetFormId(int id) {
		FormId = id;
	}

	static int GetFormId() {
		return FormId;
	}
public:
	void AddActivities(Osp::Base::Collection::IList* pActivityList);
	void DisplayResultUpdateStatusText();
	void SetSnsGateWayTwitterForm(MySnsGatewayManager*pSnsGateway);
	MySnsGatewayManager*GetSnsGatewayTwitterForm();
	void SetMyUseName(Osp::Base::String myUserName);
	Osp::Graphics::Bitmap*GetBitmapN(const Osp::Base::String& name);

	void TroVeTrangChu();
	void ThemStatus();
	void ThongBaoLoi(Osp::Base::String value);
	void SetStateToButton(bool home, bool next, bool statOption);
};

#endif
